/***************************************************************************
 *            option.h
 *
 *  Sa Januar 21 13:03:13 2012
 *  Copyright  2012  ich
 *  <user@host>
 ****************************************************************************/
/*
 * option.h
 *
 * Copyright (C) 2012 - ich
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 */


#ifndef OPTION_H_INCLUDED
#define OPTION_H_INCLUDED

#include <stdio.h>
#include <stdlib.h>


typedef struct TFN_Option_s {
	//nur fürs laden
	char ver[3];
	
	//bildschirm optionen
	int wbild_x;
	int wbild_y;
	int wbild_flags;
	int fsbild_x;
	int fsbild_y;
	int fsbild_bpp;
	int fsbild_flags;
	int framerate;

	char theme[255];
	
	//tastatur optionen
	int stein_runter_delay;
	int stein_linksrechts_delay;
	int stein_drehen_delay;
	char brick_down, brick_right, brick_left, brick_rotat, pause;
	

	//level optionen
	int lv2_p, lv3_p, lv4_p, lv5_p, lv6_p, lv7_p, lv8_p, lv9_p, lv10_p, lv11_p, lv12_p, lv13_p,lv14_p, lv15_p;
	int lv1_d, lv2_d, lv3_d, lv4_d, lv5_d, lv6_d, lv7_d, lv8_d, lv9_d, lv10_d, lv11_d, lv12_d, lv13_d, lv14_d, lv15_d;

}TFN_Option_t, *TFN_Option_p;

extern FILE *log_f;




/**
 * \brief Läd die konfigurationsdatei
 * 
 * Versucht erst die Konfigurationsdatei aus dem benutzerverzeichnuís zu laden
 * und wenn da keine ist, wird die globale geladen
 */
int TFN_LadeCFG (TFN_Option_p opt);
int TFN_InitLog (void);
int TFN_SpeicherCFG (TFN_Option_p opt);


#endif // OPTION_H_INCLUDED
